package gdut.imis.controller;

import gdut.imis.Utils.Result;
import gdut.imis.domain.ClubInstitutionDepartmentFile;
import gdut.imis.service.ClubInstitutionDepartmentFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author JiaFu
 * @Date 2023/4/7 15:00
 */
@RestController
@RequestMapping("/club-institution-department-file")
@Api(value = "社团机构部门档案接口", tags = {"社团机构部门档案接口"})
@RequiredArgsConstructor
public class ClubInstitutionDepartmentFileController extends BaseController {
    private final ClubInstitutionDepartmentFileService clubInstitutionDepartmentFileService;

    @ApiOperation("新增社团机构部门档案")
    @PostMapping("/addDepartMent")
    @PreAuthorize("@cp.hasPermission('clubInstitutionDepartmentFile')")
    public Result addDepartMent(@RequestBody ClubInstitutionDepartmentFile clubInstitutionDepartmentFile) {
        return clubInstitutionDepartmentFileService.addDepartMent(clubInstitutionDepartmentFile);
    }

}
